import React from 'react'
import Backdrop from '../Backdrop/back'
import classes from './confirm.module.css'
export default function Confirm(props) {
  const cancelhandler=(e)=>{
    e.stopPropagation();
    props.oncancel()
  }
  return (
    <div className={classes.outbox} onClick={cancelhandler}>
   <Backdrop onClick={cancelhandler}/>
    <div className={classes.clearbox}>
        <p className={classes.text}>确认清除购物车吗？(请谨慎操作)</p>
        <div >
        <button onClick={cancelhandler} className={classes.cancel}>取消</button>
        <button onClick={props.onok} className={classes.ok}>确认</button>
        </div>
       
    </div>
    </div>
  )
}
